/*****************************************************************
 MYD Engine v0.1

 file: myd_game.inl
 Created: 18/06/09
*****************************************************************/
inline void Game::addEntity(Entity* tm_entity)
{
	assert(tm_entity);
	wn_entities.push_back(tm_entity);
	physics.add(tm_entity);
}

inline Importer *Game::getImporter()
{
	return wn_importer;
}

inline void Game::sortEntitiesByDepth()
{
	std::sort(wn_entities.begin(), wn_entities.end(), Game::Zcompare);
}

inline bool Game::Zcompare(Entity *entity1, Entity *entity2)
{
	return (entity1->getPosZ() > entity2->getPosZ());
}


//OLD CRAP
/*inline void Game::setViewPosition(float x, float y)
{
	wn_renderer->setViewPosition(x, y);
}*/